package com.tamtamy.jtta.data.json;

import net.sf.json.JSONObject;

import com.tamtamy.jtta.data.Notice;
import com.tamtamy.jtta.utility.JSONUtility;

public class JSONNotice extends Notice{
	
	public JSONNotice(JSONObject jsonObject){
		super();
		this.id = JSONUtility.getLong(jsonObject, "id");
		this.created = JSONUtility.getDate(jsonObject, "created");
		this.userId = JSONUtility.getString(jsonObject, "userId");
		this.noticeType = JSONUtility.getString(jsonObject, "noticeType");
		this.targetId = JSONUtility.getString(jsonObject, "targetId");
		this.title = JSONUtility.getString(jsonObject, "title");
		this.description = JSONUtility.getString(jsonObject, "description");
		this.permalink = JSONUtility.getString(jsonObject, "permalink");
		this.thumbnailPresent = JSONUtility.getBoolean(jsonObject, "thumbnailPresent");
		this.thumbnailSmall = JSONUtility.getString(jsonObject, "thumbnailSmall");
		this.thumbnailRect = JSONUtility.getString(jsonObject, "thumbnailRect");
		this.thumbnailMedium = JSONUtility.getString(jsonObject, "targethumbnailMediumtId");
		this.thumbnailOriginal = JSONUtility.getString(jsonObject, "thumbnailOriginal");
	}

}
